import { createSlice, type PayloadAction } from '@reduxjs/toolkit'

interface GlobalState {
	currentCity: string
}

const initialState: GlobalState = {
	currentCity: '全部科室',
}

export const UseStatekeshi = createSlice({
	name: 'UseStatekeshi',
	initialState,
	reducers: {
		setCurrentkeshi(state, action: PayloadAction<string>) {
			state.currentCity = action.payload
		},
	},
})
export const { setCurrentkeshi } = UseStatekeshi.actions

export default UseStatekeshi.reducer